package com.market.manager;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.market.domain.Location;
import com.market.domain.PickupSchedule;
import com.market.domain.User;

public interface LocationManager extends GenericManager<Location, Long> {
	/**
	 * This load all pickup schedule are associated with this location
	 * @param location
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED,readOnly=true)
	public List<PickupSchedule> fetchPickupSchedules(Location location);
	
	/**
	 * This load location's  all users .
	 * @param location
	 * @return
	 */
	@Transactional(propagation = Propagation.REQUIRED,readOnly=true)
	public List<User> fetchUsers(Location location);
	
	@Transactional(propagation = Propagation.REQUIRED,readOnly=true)
	public List<Location> fetchAllOrderByNumber();
}
